Skip to content

Conversation

@Lash-L
Copy link
Collaborator

@Lash-L Lash-L commented Dec 29, 2025

This allows type checkers to understand the proper typing of the object.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
roborock/data/code_mappings.py 88.88% <100.00%> (+0.09%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves type checking for the RoborockModeEnum class by replacing explicit RoborockModeEnum return type annotations with Self. This allows type checkers to correctly infer that subclasses of RoborockModeEnum return their own type rather than the base class type.

Key changes:

  • Added Self import from the typing module
  • Updated return type annotations for __new__, from_code, from_value, and from_name methods to use Self

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. I had the impression this required a newer version of python but maybe i'm mixing it up with another feature.

@allenporter allenporter merged commit 0cc41e8 into main Dec 29, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants